<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="vue" v-clock>
    <p>currentTime1: {{currentTime1()}}</p>
    <p>currentTime2: {{currentTime2}}</p>
</div>


<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: "#vue",
        data: {
            message: "hello, vue"
        },
        methods: {
            currentTime1: function () {
                return Date.now();  // 返回当前时间 - 时间戳
            }
        },
        computed: { // 计算属性： methods 与 computed 方法名不能重名，重名之后，只会调用 methods 中的方法
            currentTime2: function () {
                return Date.now();  // 返回当前时间 - 时间戳
            }
        }
    });
</script>

</body>
</html>